a = []
for i in range(2, 2020):
    if 2020 % i == 0:
        a.append(i)

result = 0
for i in range(1, 2020):
    for j in a:
        if i % j == 0:   
            break
    else:
        result += 1

print(result)

